that OFFLINE is only sent if the ONLINE event has been sent. Secondly, this
fixes one possible cause of the reopened bug #549 as it prevents be->netif
being dereferenced inside netback_uevent. Early reports suggest that this is
not the only cause of #549, so that bug remains open for now.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
break;
case XenbusStateClosed:
- kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
+ if (be->netif != NULL)
+ kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
device_unregister(&dev->dev);
break;